<template>
    <el-table
      :data="tableData"
      style="width: 100%">
      <el-table-column
        prop="goods_pic"
        label="图片"
        width="360">
        <template slot-scope="scope">
       <img  :src="scope.row.goods_pic" alt="" style="width: 200px;height: 150px">
      </template>
      </el-table-column>
      <el-table-column
        prop="title"
        label="标题"
        width="360">
      </el-table-column>
      <el-table-column
        prop="create_time"
        label="时间"
        width="360">
      </el-table-column>
      <el-table-column
        prop="content"
        label="内容"
        width="360">
      </el-table-column>
      
      <el-table-column
      prop=""
      label="操作">
      <el-button type="primary" icon="el-icon-edit">修改</el-button>
       <el-button type="primary" icon="el-icon-delete-solid" style="background-color:#FE6A66">删除</el-button>
      </el-table-column>
    </el-table>

</template>
<script>
export default({
  data(){
    
        return {
        
      tableData:{}
        }
    },
    methods:{
       getlist(){
         console.log(localStorage.getItem("mytoken"))
         this.$axios({
           methods:"get",
           url:'/index.php/admin/Index/article2List',
           params:{
             token:localStorage.getItem("mytoken")
           },
         }).then(res=>{
           this.tableData = res.data.data.cateList
           console.log(res)
           console.log(localStorage.getItem("mytoken"))
         }).catch(err => { //请求失败就会捕获报错信息
                 //err.response可拿到服务器返回的报错数据   
                console.log(err)    
           })
       }
       
    },

    
     mounted(){
       this.getlist()
     }
})



</script>